import App from './App' 

// 全局守卫 router.js 导入 挂载
import {router,RouterMount} from 'router/index.js'
Vue.use(router)

// 导入 && 全局绑定
import http from 'common/http.js'
Vue.prototype.$http = http

// 全局 混入
import lib from './common/lib.js'
Vue.mixin(lib)

// 过滤器
import * as filters from 'common/filter.js'
Object.keys(filters).forEach(key=>{ 
	Vue.filter(key,filters[key])
})

// store
import store from 'store'
Vue.prototype.$store = store

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app,
	store
  }
}
// #endif

// #ifdef H5
RouterMount(app,router,'#app')
// #endif
// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif